Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: program firmware protocol #34

Merged
merged 8 commits into from
Dec 18, 2023
Merged

feature: program firmware protocol #34

merged 8 commits into from
Dec 18, 2023

Conversation

ssp-rs
Copy link
Collaborator

@ssp-rs ssp-rs commented Dec 18, 2023

Adds types necessary for implementing the program firmware protocol over SSP.

Adds a helper function for parsing ITL firmware files into FirmwareHeader, FirmwareRam, and FirmwareData types that represent the header, RAM, and dataset blocks respectively.

Adds the `FirmwareHeader` type to represent the header block in an ITL
firmware file. The header block contains information about the rest of
the firmware file, including the magic bytes, RAM block size, and
firmware file code.
Adds the `FirmwareRam` type to represent the RAM block in an ITL
firmware file. The RAM block contains code executed on the machine during the
firmware update process.
Adds the `FirmwareData` type to represent the dataset block in an ITL
firmware file. The dataset block contains currency set information, and
other data needed to run the validator device.
Adds the `parse_firmware_file` helper function to parse
`FirmwareHeader`, `FirmwareRam`, and `FirmwareData` structures from an
ITL firmware file.
Adds the `ProgramFirmwareCommand` and `ProgramFirmwareResponse` messages
for use programming unit firmware.
Uses conditional compilation to not create a `rng` variable when in
`test` mode. Clears compiler warnings about unused variable.
Adds the `FirmwareHeaderCommand` and `FirmwareHeaderResponse` messages
for sending the ITL firmware file header to the validator unit.
Cleans up some code, and adds a formatter implementation for
`FirmwareHeader`.
@ssp-rs ssp-rs merged commit 0185ee2 into main Dec 18, 2023
18 checks passed
@ssp-rs ssp-rs deleted the feature/program-firmware branch December 18, 2023 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant